<template>
    <el-container>
        <el-header style="height: 7%">
            <el-row>
                <el-col :span="24">
                    <div class="grid-content bg-purple-dark">
                        <span id="title"><b><span style="color: #277af8;">W</span>anma<span style="color: #277af8;">R</span>ecruit</b>--后台管理</span>
                    </div>
                </el-col>
                <div style="position: absolute; margin-left: 90%; font-family: '黑体';">
                    <i class="el-icon-user-solid"></i>
                    <el-dropdown>
                        <span class="el-dropdown-link">
                            {{managerName}}<i class="el-icon-arrow-down el-icon--right"></i>
                        </span>
                        <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item>修改密码</el-dropdown-item>
                            <el-dropdown-item @click.native="exitLogin">退出登录</el-dropdown-item>
                        </el-dropdown-menu>
                    </el-dropdown>
                </div>
            </el-row>

        </el-header>
        <el-container>
            <el-aside width="250px">
                <el-col :span="24" style="text-align: left;">
                    <el-menu
                            :router="true"
                            class="el-menu-vertical-demo"
                            text-color="#383838"
                            active-text-color="#E6A23C"
                            style="background-color: #e6f0f9;">
                        <el-menu-item index="/manage/index">
                            <i class="el-icon-menu"></i>首页
                        </el-menu-item>
                        <el-submenu index="1">
                            <template slot="title">
                                <i class="el-icon-menu"></i>
                                <span>审核管理</span>
                            </template>
                            <el-menu-item-group>
                                <el-menu-item index="/manage/positionList">职位发布列表</el-menu-item>
                                <el-menu-item index="/manage/auditCompany">公司申请列表</el-menu-item>
                            </el-menu-item-group>
                        </el-submenu>
                        <el-submenu index="2">
                            <template slot="title">
                                <i class="el-icon-menu"></i>
                                <span>公司管理</span>
                            </template>
                            <el-menu-item-group>
                                <el-menu-item index="/manage/companyList">公司管理</el-menu-item>
                                <el-menu-item index="1-2">简历管理</el-menu-item>
                            </el-menu-item-group>
                        </el-submenu>
                        <el-submenu index="3">
                            <template slot="title">
                                <i class="el-icon-user-solid"></i>
                                <span>用户管理</span>
                            </template>
                            <el-menu-item-group>
                                <el-menu-item index="/manage/userMessageList">个人信息管理</el-menu-item>
                            </el-menu-item-group>
                        </el-submenu>
                        <el-submenu index="4">
                            <template slot="title">
                                <i class="el-icon-setting"></i>
                                <span>管理员管理</span>
                            </template>
                            <el-menu-item-group>
                                <el-menu-item index="/manage/managerList">管理员列表</el-menu-item>
                                <el-menu-item index="/manage/insertManager">新增管理员</el-menu-item>
                            </el-menu-item-group>
                        </el-submenu>
<!--                        <el-submenu index="5">-->
<!--                            <template slot="title">-->
<!--                                <i class="el-icon-setting"></i>-->
<!--                                <span>导航四</span>-->
<!--                            </template>-->
<!--                            <el-menu-item-group>-->
<!--                                <template slot="title">分组一</template>-->
<!--                                <el-menu-item index="1-1">选项1</el-menu-item>-->
<!--                                <el-menu-item index="1-2">选项2</el-menu-item>-->
<!--                            </el-menu-item-group>-->
<!--                            <el-menu-item-group title="分组2">-->
<!--                                <el-menu-item index="1-3">选项3</el-menu-item>-->
<!--                            </el-menu-item-group>-->
<!--                            <el-submenu index="1-4">-->
<!--                                <template slot="title">选项4</template>-->
<!--                                <el-menu-item index="1-4-1">选项1</el-menu-item>-->
<!--                            </el-submenu>-->
<!--                        </el-submenu>-->
<!--                        <el-submenu index="6">-->
<!--                            <template slot="title">-->
<!--                                <i class="el-icon-setting"></i>-->
<!--                                <span>导航四</span>-->
<!--                            </template>-->
<!--                            <el-menu-item-group>-->
<!--                                <template slot="title">分组一</template>-->
<!--                                <el-menu-item index="1-1">选项1</el-menu-item>-->
<!--                                <el-menu-item index="1-2">选项2</el-menu-item>-->
<!--                            </el-menu-item-group>-->
<!--                            <el-menu-item-group title="分组2">-->
<!--                                <el-menu-item index="1-3">选项3</el-menu-item>-->
<!--                            </el-menu-item-group>-->
<!--                            <el-submenu index="1-4">-->
<!--                                <template slot="title">选项4</template>-->
<!--                                <el-menu-item index="1-4-1">选项1</el-menu-item>-->
<!--                            </el-submenu>-->
<!--                        </el-submenu>-->
<!--                        <el-submenu index="7">-->
<!--                            <template slot="title">-->
<!--                                <i class="el-icon-setting"></i>-->
<!--                                <span>导航四</span>-->
<!--                            </template>-->
<!--                            <el-menu-item-group>-->
<!--                                <template slot="title">分组一</template>-->
<!--                                <el-menu-item index="1-1">选项1</el-menu-item>-->
<!--                                <el-menu-item index="1-2">选项2</el-menu-item>-->
<!--                            </el-menu-item-group>-->
<!--                            <el-menu-item-group title="分组2">-->
<!--                                <el-menu-item index="1-3">选项3</el-menu-item>-->
<!--                            </el-menu-item-group>-->
<!--                            <el-submenu index="1-4">-->
<!--                                <template slot="title">选项4</template>-->
<!--                                <el-menu-item index="1-4-1">选项1</el-menu-item>-->
<!--                            </el-submenu>-->
<!--                        </el-submenu>-->
<!--                        <el-submenu index="8">-->
<!--                            <template slot="title">-->
<!--                                <i class="el-icon-setting"></i>-->
<!--                                <span>导航四</span>-->
<!--                            </template>-->
<!--                            <el-menu-item-group>-->
<!--                                <template slot="title">分组一</template>-->
<!--                                <el-menu-item index="1-1">选项1</el-menu-item>-->
<!--                                <el-menu-item index="1-2">选项2</el-menu-item>-->
<!--                            </el-menu-item-group>-->
<!--                            <el-menu-item-group title="分组2">-->
<!--                                <el-menu-item index="1-3">选项3</el-menu-item>-->
<!--                            </el-menu-item-group>-->
<!--                            <el-submenu index="1-4">-->
<!--                                <template slot="title">选项4</template>-->
<!--                                <el-menu-item index="1-4-1">选项1</el-menu-item>-->
<!--                            </el-submenu>-->
<!--                        </el-submenu>-->
<!--                        <el-menu-item index="2">-->
<!--                            <i class="el-icon-menu"></i>-->
<!--                            <span slot="title">导航二</span>-->
<!--                        </el-menu-item>-->
<!--                        <el-menu-item index="3" disabled>-->
<!--                            <i class="el-icon-document"></i>-->
<!--                            <span slot="title">导航三</span>-->
<!--                        </el-menu-item>-->
<!--                        <el-menu-item index="4">-->
<!--                            <i class="el-icon-setting"></i>-->
<!--                            <span slot="title">导航四</span>-->
<!--                        </el-menu-item>-->
                    </el-menu>
                </el-col>
            </el-aside>
            <router-view/>
        </el-container>
    </el-container>
</template>

<script>
    export default {
        name: "manage",
        data(){
            return{
                managerName:""
            }
        },
        created() {
          this.managerName=JSON.parse(window.localStorage.getItem("loginManager")).name;
        },
        methods:{
            exitLogin(){
                window.localStorage.removeItem("loginManager");
                window.localStorage.removeItem("token");
                this.$router.push("/");
            }
        }
    }
</script>

<style>
    #title{
        font-family: '黑体';
        font-size: 24px;
    }
    html{
        height: 100%;
    }
    body{
        height: 100%;
        padding: 0px;
        margin: 0px;
    }
    .el-container{
        height: 100%;
    }
    .el-header{
        background-color: #e6f0f9;
        color: #333;
        text-align: left;
        line-height: 60px;
    }

    .el-aside {
        background-color: #e6f0f9;
        color: #333;
        text-align: center;
        line-height: 200px;
    }

    .el-main {
        background-color: #E9EEF3;
        color: #333;
        text-align: center;
        line-height: 160px;
    }

    body > .el-container {
        margin-bottom: 40px;
    }

    .el-container:nth-child(5) .el-aside,
    .el-container:nth-child(6) .el-aside {
        line-height: 260px;
    }

    .el-container:nth-child(7) .el-aside {
        line-height: 320px;
    }
    .el-row {
        margin-bottom: 20px;
    &:last-child {
         margin-bottom: 0;
     }
    }
    .el-col {
        border-radius: 4px;
    }
    .bg-purple-dark {
        /*background: #409EFF;*/
    }
    .bg-purple {
        background: #d3dce6;
    }
    .bg-purple-light {
        background: #e5e9f2;
    }
    .grid-content {
        border-radius: 4px;
        min-height: 36px;
    }
    .row-bg {
        padding: 10px 0;
        background-color: #f9fafc;
    }
</style>